Re: plperl doesn't release memory - Mailing list pgsql-general

From Dan Sugalski
Subject Re: plperl doesn't release memory
Date
Msg-id a06210206be68ca0ec4e9@[192.168.0.8]
Whole thread Raw
In response to Re: plperl doesn't release memory  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: plperl doesn't release memory
Re: plperl doesn't release memory
List pgsql-general
At 1:51 PM -0500 3/24/05, Tom Lane wrote:
>What you probably ought to do next is build Postgres with a debugging
>malloc library to learn more about who's eating up what.  I am not sure
>whether libperl will automatically use the malloc attached to the main
>executable or whether you need to whack it around too.  (Come to think
>of it, doesn't Perl normally use its very own private malloc?  Maybe
>there's an issue right there ...)

Perl can, yeah. If a

    perl -V

shows a "usemymalloc=y" in the output somewhere then perl's using its
own internal malloc and you're definitely never going to release
memory to anything. If it's 'n' then it'll use the default malloc
scheme -- I'm pretty sure for embedding use it uses whatever routines
the embedder defines, but it's been a while since I've poked around
in there.

Anyway, if perl's using its own memory allocator you'll want to
rebuild it to not do that.
--
                Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk

pgsql-general by date:

Previous
From: Thomas F.O'Connell
Date:
Subject: Re: How to get the size in bytes of a table data
Next
From: "GIROIRE Nicolas (COFRAMI)"
Date:
Subject: sort array optimisation in pl/perl